import Vue from 'vue';
import VueRouter from 'vue-router';
Vue.use(VueRouter);

import home from './components/tabbar/HomeContainer.vue';
import huiyuan from './components/tabbar/VipContainer.vue';
import shopcar from './components/tabbar/ShopcarContainer.vue';
import search from './components/tabbar/SearchContainer.vue';
import newsList from './components/news/NewsList.vue';
import newsInfo from './components/news/NewsInfo.vue';
import photolist from './components/photos/PhotoList.vue';
import photoinfo from './components/photos/PhotoInfo.vue';

import goodslist from './components/goods/GoodsList.vue';
import goodsinfo from './components/goods/GoodsInfo.vue';

var vr = new VueRouter({
    routes: [{
        path: '/',
        redirect: "home"
    }, {
        path: '/home',
        component: home,
    }, {
        path: '/huiyuan',
        component: huiyuan,
    }, {
        path: 'shopcar',
        component: shopcar
    }, {
        path: 'search',
        component: search,
    }, {
        path: '/home/newsList',
        component: newsList,
    }, {
        path: '/home/photolist',
        component: photolist,
    }, {
        path: '/home/newsList/newsInfo/:id',
        component: newsInfo,
    }, {
        path: '/home/photolist/photoinfo/:id',
        component: photoinfo,
    }, {
        path: '/home/goodslist',
        component: goodslist,
    }, {
        path: '/home/goodslist/goodsinfo/:id',
        component: goodsinfo,
    }],
    linkActiveClass: 'mui-active'
})
export default vr;
